function load_publish_cnt(data){
	$('a.sns').click(function(){
		$('.popover-cnt').load($(this).attr('href'),load_publish_cnt);
		return false;
	});
	$('#publishForm').ajaxForm({
		beforeSubmit:function(){
			publish_busy('start')
		},
		error:function(data){
			$.popover_alert({
				attach:false,message:$.parseJSON(data.responseText).error,offset_parent:$('.popover-cnt')
			});
		},
		success:function(data){
			publish_busy('end');
			location.reload();
		}
	});
}

function publish_busy(status){
	if(status=='start'){
		$('.po-publish .publish-btn').hide();
		$('.po-publish .publish-loading').show();
	}else if(status=='end'){
		$('.po-publish .publish-btn').show();
		$('.po-publish .publish-loading').hide();
	}
}